package com.liik.bomb.screen.main;

import com.liik.bomb.BombActivity;
import com.liik.game.mvc.GameModel;
import com.liik.game.mvc.GameRenderer;
import com.liik.game.mvc.object.Display;
import com.liik.game.mvc.object.Menu.Item;
import com.liik.game.mvc.object.Navigation;
import com.liik.game.mvc.simple.SimpleGameController;

public class MainMenuController extends SimpleGameController {

	public final static int MENU_ID_START = 0;
	public final static int MENU_ID_LEVEL = 1;
	public final static int MENU_ID_EXIT = 2;

	@Override
	public void update(GameModel gameModel, Navigation navigation, Display display) {

	}

	@Override
	public void controlGained(Object message, GameModel gameModel, GameRenderer renderer) {
		// if winner -> load new level screen
		// if looser -> load old level screen
		// if exit -> do nothing
	}

	@Override
	public void handleMenuEvent(Item menuItem, GameModel activeModel) {
		switch (menuItem.id) {
		case MENU_ID_EXIT:
			screenHolder.popScreen("Exit");
			break;
		case MENU_ID_START:
			screenHolder.pushScreen(BombActivity.SCREEN_ID_BOMB_GAME, "Start");
			break;
		case MENU_ID_LEVEL:
			screenHolder.pushScreen(BombActivity.SCREEN_ID_LEVELS, "Select Level");
			break;
		}
	}
}
